package com.imooc.threadexample;

/**
 * Created by yijy on 2017/11/17.
 */
public class EnergyTransferTest {
    //能量盒子数量
    public static int MaxNumber = 100;
    //每个盒子的初始化能量
    public static double InitEnergy=1000;

    public static void main(String[] args) {
        EnergySystem energySystem = new EnergySystem(MaxNumber,InitEnergy);
        for(int i=0;i<MaxNumber;i++){
            EnergyThread task = new EnergyThread(energySystem,i,InitEnergy);
            Thread thread = new Thread(task,"TransferThread_"+i);
            thread.start();
        }
    }
}
